package com.dream.xiaobo.dao;

import com.dream.xiaobo.entity.User;

import java.sql.SQLException;
import java.util.List;

/**
 * @author xiaobo
 * @date 2021/8/27 - 21:39
 */
public interface UserDao {

    /**
     * 检查用户是否存在的dao接口
     * @param username
     * @return
     * @throws SQLException
     */
    User selectUserByName(String username) throws SQLException;

    /**
     * 添加用户信息
     * @param user
     * @return
     */
    Integer insertUser(User user) throws SQLException;

    /**
     * 检查激活状态
     * @param code
     * @return
     */
    User selectUserByCode(String code) throws SQLException;

    List<User> selectUserByRole() throws SQLException;

    void deleteUserByUId(String uId) throws SQLException;

    List<User> selectUserByStatus() throws SQLException;
}
